cture cross;
> cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
> draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
> scaled .8pt ;
> \stopuniqueMPgraphic
>
> \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
>
> \define[1]\cancel{%
>
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
Maybe something else is available nowadays
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
\dots E.g
scaled .8pt ;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
\mpos macro that uses
>> \hpos but sets the contents as display-style math. This isn’t great for
>> spacing, and it does't adapt to different math styles. \framed has a math
>> version, \mframed, that sets the contents in the appropriate math style. If
>> anyone know a way to
version of \hpos? The contents of \hpos are set as
text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses
\hpos but sets the contents as display-style math. This isn’t great for
spacing, and it does't adapt to different math styles. \framed has a math
version, \mframed
version of \hpos? The contents of \hpos are set as
text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses
\hpos but sets the contents as display-style math. This isn’t great for
spacing, and it does't adapt to different math styles. \framed has a math
version, \mframed
Hello everyone,
I'm using \startaligned with pairs and a distance to represent inference steps,
one per row.
Now I would like to sometimes add a vertical bar to the left of the rows and one
below the last row. I was able to achieve this using \mframed, but now the
contented inside the framed box
Mathias Schickel schrieb am 07.12.18 um 12:09:
Dear list,
it seems that \mframed does not align properly. Compare the example
fount at https://www.contextgarden.net/Framed#Location_parameter to
the compiled example attached.
What can I do to get a correctly aligned framed formula
Dear list,it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached.What can I do to get a correctly aligned framed formula?Many thanks for you help,Mathias
mframed.tex
Description: TeX
<- works like a charm
\mframed[offset=1mm,loffset=3mm,roffset=3mm]
{a + b = c}
\stopformula
\startformula \startalign <- that's an example
multiline equation
\NC c - a = \NC b \NR<- unframed it works
\NC
rks like a charm
\mframed[offset=1mm,loffset=3mm,roffset=3mm]
{a + b = c}
\stopformula
\startformula \startalign <- that's an example
multiline equation
\NC c - a = \NC b \NR<- unframed it works
\NC d + c - b = \NC a \NR
\stopalign \st
{\mframed[frame=off,
topframe=on,
bottomframe=on,
frameoffset=\dimexpr.254\baselineskip\relax,
height=\lineheight
]}
\def\borderdttop{\mframed[frame=off,
bottomframe=on,
frameoffset=\dimexpr.254\baselineskip\relax,
height=\lineheight
]}
\definehspace[spacedt] [2
, at 22:18, Aditya Mahajan adit...@umich.edu wrote:
On Mon, 21 Oct 2013, Otared Kavian wrote:
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv the frame is not vertically aligned with the the + sign
in the following example (or rather
On Tue, 22 Oct 2013, Otared Kavian wrote:
Hi Aditya,
I wikified your remarks,
http://wiki.contextgarden.net/Math/Display#Shaded_background_for_part_of_a_displayed_equation
Rather than
\def\graymath{\mframed[frame=off,
background=color,
backgroundcolor=gray
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv the frame is not vertically aligned with the the + sign in
the following example (or rather it is not vertically centered, please see the
attached PDF produced with ConTeXt ver
On Mon, 21 Oct 2013, Otared Kavian wrote:
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv the frame is not vertically aligned with the the + sign in
the following example (or rather it is not vertically centered, please see
Thanks Aditya!
I overlooked this change in mkiv…
Best regards: OK
On 21 oct. 2013, at 22:18, Aditya Mahajan adit...@umich.edu wrote:
On Mon, 21 Oct 2013, Otared Kavian wrote:
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv
\pack_framed_mc_one}
\unexpanded\def\pack_framed_mc_end
{\egroup
\egroup}
\unexpanded\def\pack_framed_mc_nop#1%
{\pack_framed_mc_begin
\mframed{\xypos\pack_framed_mc_two#1}%
\pack_framed_mc_end}
\unexpanded\def\pack_framed_mc_yes[#1]#2%
{\pack_framed_mc_begin
\mframed[#1]{\xypos
pencircle scaled 1pt dashed withdots;
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic
\defineoverlay[Label][\useMPgraphic{Label}]
\def\dottext#1%
{ \mframed[frame=off, background=Label, location=low]
{ #1 }
}
\setupcolors[state=start]
\def\rndgraymath{\mframed[frame
OverlayLineColor ;
\stopuniqueMPgraphic
\defineoverlay[LabelA][\uniqueMPgraphic{LabelA}]
\defineoverlay[LabelB][\uniqueMPgraphic{LabelB}]
\def\VariantA{\mframed[foregroundstyle=\tfc,frame=off,background=LabelA,backgroundoffset=3pt,backgroundcolor=red]}
\def\VariantB{\mframed[foregroundstyle=\tfc,frame
\NR
\NC a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \NR
\NC \vdots \NC \vdots \NC \ddots \NC \vdots \NR
\NC a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NR
\stopmatrix
\stopformula
But \frame or \inframe is not working inside matrix.
Is there a way to do that?
maybe \mframed
Dear Hans,
Thank you for quick answer and for reminding me \mframed.
\mframed is working if I enclose one term like ... \NC{\mframed[]{x+y}}\NC
...\NC\NR.
But I'd like to enclose the whole row in one frame.
I apply \mframed to every term and get close result except there are gaps
between
Hi Dalyoung,
Is this what you want:
\setupcolors[state=start]
\def\RedMath{\mframed[frame=on,
framecolor=red,
offset=2pt,
% background=color,
% backgroundcolor=lightred,
% backgroundoffset=2pt
]}
\starttext
\startformula
\startmatrix[left={\left
.
Is there a way to do that?
maybe \mframed
He’s looking for \HL and \VL commands like the table below has to frame a
complete row in the matrix.
\starttext
\startformula
\startmatrix[left={\left(\,},right={\,\right)}]
\NC a_{11} \NC a_{12} \NC \cdots \NC a_{1n} \NR
\NC \vdots \NC \vdots \NC \vdots \NC
On 25-1-2012 21:17, Aditya Mahajan wrote:
@Hans: Can we have \definemframed etc as well?
sure, the next beta will have ...
\starttext
\dontleavehmode test \mframed{x} test $x^{\mframed{x}}$ test
\inmframed{x} test $x^{\inmframed{x}}$ test
\definemathframed[whatever][location=low
{\mathsurround\zeropoint$#1$}. But for
this to work in subscripts and superscripts, you must use math palette.
IIRC, \mframed does that. In principle:
\mframed[background=strikeme]{...}
should work (untested).
@Hans: Can we have \definemframed etc as well
2012/1/25 Aditya Mahajan adit...@umich.edu
Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for
this to work in subscripts and superscripts, you must use math palette.
IIRC, \mframed does that. In principle:
\mframed[background=strikeme]{**...}
should work (untested
On Thu, 26 Jan 2012, Philipp A. wrote:
2012/1/25 Aditya Mahajan adit...@umich.edu
Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for
this to work in subscripts and superscripts, you must use math palette.
IIRC, \mframed does that. In principle:
\mframed[background
Hello,
Is it possible (using ConTeXt MKII) to put a frame
(and/or other highlighters) around an aligned multiline
formula, and also around a single line of this equation array?
(The equation number should align correctly outside the frame.)
\mframed within an alignment seems to refuse the job
Hi,
In MkIV, \mframed does not place the result in the middle of the math
axis. Consider,
\starttext
\startformula
f(x) = \mframed{\frac{1}{2}}^{\mframed{\frac{1}{2}}}
\stopformula
\stoptext
The MkII and MkIV results are attached.
Adityaattachment: test-mkii.pngattachment: test
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for \mframed...
minimal example:
\starttext
\startformula
A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
\stopformula
On Monday 11 May 2009 15:40:04 Hans Hagen wrote:
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for
\mframed... minimal example:
\starttext
\startformula
A = B + \mframed
On Mon, 11 May 2009, Hans Hagen wrote:
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for
\mframed...
minimal example:
\starttext
\startformula
A = B + \mframed[frame=off,background
Aditya Mahajan wrote:
On Mon, 11 May 2009, Hans Hagen wrote:
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for
\mframed...
minimal example:
\starttext
\startformula
A = B + \mframed
\mframed misbehaves under mkiv (latest minimals)
minimal example:
\setupcolors[state=start]
\starttext
\mframed[frame=off,background=color,backgroundcolor=yellow]{k_2 \propto \langle
N \rangle^{\alpha}}
\stoptext
- framed text, white background
(works correctly under mkii: no frame, yellow
\}} shifted(1u,0u); % no braces
\stopMPcode
\stoptext
I remember having problems with at least {, }, #, and with the usage
of the following macro inside metapost:
% outside:
\def\combine#1{\hbox to .5em{}\hbox to
0pt{\hss\color[red]{\mframed[frame=off]{#1}}\hss}\hbox to
0pt{\hss\color[darkgray]{o}\hss
); % no braces
\stopMPcode
\stoptext
I remember having problems with at least {, }, #, and with the usage
of the following macro inside metapost:
% outside:
\def\combine#1{\hbox to .5em{}\hbox to
0pt{\hss\color[red]{\mframed[frame=off]{#1}}\hss}\hbox to
0pt{\hss\color[darkgray]{o}\hss}}
% usage inside
In displayed math I was trying to highlight a piece of a formula using a
gray background. After a few spacing failures with \framed, I
discovered \mframed in the core-rul.tex source file. The comments there
say:
%D As usual, one can specify in what way the text should be
%D framed. One should
Hi Sanjoy, welcome back
In displayed math I was trying to highlight a piece of a formula
using a
gray background. After a few spacing failures with \framed, I
discovered \mframed in the core-rul.tex source file. The comments
there
say:
Use backgroundoffset, not frameoffset.
Wolfgang
Aditya Mahajan wrote:
Here is an example:
\setupcolors[state=start]
\def\solutionbox
{\dosingleempty\dosolutionbox}
\def\dosolutionbox[#1]%
{\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1]
{\strut}}
\starttext
[cut]
\stoptext
Aditya
Thanks
]%
{\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1]
{\strut}}
\starttext
Not aligned
\startformula \startalign[n=1]
\NC 6 + 7 + 4 = \solutionbox \NR
\NC 16 + 5 + 4 = \solutionbox[width=1cm] \NR
\NC 6 + 200 + 4 = \solutionbox[width=3cm] \NR
\stopalign \stopformula
the numbers on the same baseline and let the
frame dip below the baseline.
What about \mframed? (Probably already evident from the other mail.)
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
as
a = b (*)
14. Allow a framed command that works with align and aligned. So that
a \implies\mframed{ \startaligned
\NC b \NC= c \NR
\NC e \NC= f \NR
\NC g \NC= h \NR
\stopaligned}
Comes as
+-+
| b = c |
a = | e = f |
| g = h |
+-+
15
What is the \setup... command that can be used to configure the frames
typeset by \mframed?
Thanks,
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
Aditya Mahajan wrote:
What is the \setup... command that can be used to configure the frames
typeset by \mframed?
There is no such command, so just use the optional argument
to \mframed, like:
$$
\mframed[framecolor=red]{E=mc^2}
$$
Cheers, Taco
--- On Dec 2, Mojca Miklavec wrote ---
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison to the formula
without a number
- I don't know how to do
Hello,
I would like to ask a couple of questions about frames and numbers in
math formulas.
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison
--- On Dec 2, Mojca Miklavec wrote ---
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison to the formula
without a number
- I don't know how to do
\startformula
\mframed[offset=.3em,rulethickness=1pt]{
I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C}
\stopformula
it does typeset a displayed formula. However, you could still force
displayed style by adding a \displaystyle command at the beginning of
your \mframed argument.
That's ok now
The way I usually do it:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2}
\stopformula
Regards,
David
Le Vendredi 30 septembre 2005 à 13:41 +0200, Jilani Khaldi a écrit :
Hi All,
how to make a boxed formula with ConTeXt?
Thanks
David Munger wrote:
The way I usually do it:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2}
\stopformula
Thank you for your answer. I seems that \startformula .. \stopformula
doesn't have any effect to produce a dispaly mode formula.
so:
\startformula
\mframed
Jilani,
Thank you for your answer. I seems that \startformula .. \stopformula
doesn't have any effect to produce a dispaly mode formula.
When I try:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{
I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C}
\stopformula
it does typeset a displayed
. You can
get the module here:
http://cfd.homelinux.org/tex/
The current problem, in its simplest form, is that using \mframed breaks
the spacing. Minimal example:
\starttext
We aim to get this spacing:
\startformula
a + b
\stopformula
but when using:
\startformula
a \mframed{+ b}
\stopformula
we
]
[EMAIL PROTECTED]
\ifUseSteps%
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\fi%
\fi%
\ifmmode\expandafter\mframed\else\expandafter\framed\fi%
[EMAIL PROTECTED],frame=off,offset=overlay]{#1}%
\ifmmode\;\fi}
[EMAIL PROTECTED]
[EMAIL PROTECTED];\fi}%
\ifUseSteps%
[EMAIL PROTECTED
PROTECTED]
\ifUseSteps%
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\fi%
\fi%
\ifmmode\expandafter\mframed\else\expandafter\framed\fi%
[EMAIL PROTECTED],frame=off,offset=overlay]{#1}%
\ifmmode\;\fi}
[EMAIL PROTECTED]
[EMAIL PROTECTED];\fi}%
\ifUseSteps%
[EMAIL PROTECTED]@next
56 matches
Mail list logo